import 'package:bruno/bruno.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:jinke/utils/img_util.dart';

import '../model/ReportDetailEntity.dart';

/// @Author : 王亚东

/// @Time : On 2022/9/13 14:59


 
class ItmeReportDetail extends StatelessWidget {

  ReportDetailEntity reportDetailEntity;
  ItmeReportDetail(this.reportDetailEntity);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 343.r,
      margin: EdgeInsets.fromLTRB(0.r, 5.r, 0.r, 5.r),
      padding: EdgeInsets.all(13.r),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(4.r),
      ),
      child: Column(
        children: [
          Row(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                margin: EdgeInsets.only(top: 3.r),
                child: Image.asset('icon_xiangmu.png'.imgPathReport,width: 30.r,height: 30.r,),
              ),
              SizedBox(width: 10.r,),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,

                children: [
                  Text(reportDetailEntity.projectAlias??'',style: TextStyle(color: Color(0xff333333),fontSize: 16.r,fontWeight: FontWeight.bold),),
                  SizedBox(height: 5.r,),
                  Row(
                    children: [
                      BrnStateTag(
                        tagText: reportDetailEntity.projectPhaseCn??'',
                        tagState: TagState.invalidate,
                      ),
                      SizedBox(width: 10.r,),
                      BrnStateTag(
                        tagText: reportDetailEntity.phaseStatusCn??'',
                        tagState: TagState.failed,
                      ),
                    ],
                  ),
                ],
              )
            ],
          ),
          SizedBox(height: 10.r,),
          Divider(thickness: 0.5,color: const Color(0xFFE7E7E7)),
          SizedBox(height: 10.r,),
          Text(reportDetailEntity.reportEvolveContent??'',style: TextStyle(color: Color(0xff666666),fontSize: 14.r,fontWeight: FontWeight.w500),)
        ],
      ),
    );
  }
}
